<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title>${title}</title>
	<base href="${CONTEXT_PATH}/" />
	<link href="${CONTEXT_PATH}/static/jui/themes/css/login.css" rel="stylesheet" type="text/css" />

	<script src="${CONTEXT_PATH}/static/jui/js/jquery-1.7.2.min.js"></script>
	<script src="${CONTEXT_PATH}/static/jui/js/jquery.form.min.js"></script>

</head>


<div id="login">
	<div id="login_header">
		<h1 class="login_logo">
			<a href="http://demo.dwzjs.com"><img src="${CONTEXT_PATH}/static/jui/themes/default/images/login_logo.gif" /></a>

		</h1>
		<div class="login_headerContent">
			<div class="navList">

			</div>
			<div class="login_title"><h2>漳州铁塔信息管理系统</h2></div>
		</div>
	</div>
	<div id="login_content">
		<div class="loginForm">
			<form id="login_form">
				<p>
					<label>用户名：</label>
					<input type="text" id ="username" name="userinfo.username" size="20" class="login_input" />
				</p>
				<p>
					<label>密码：</label>
					<input type="password" id =pwd name="userinfo.pwd" size="20" class="login_input" />
				</p>

				<div class="login_bar">

					<button class="sub"></button>
				</div>
			</form>
		</div>
		<div class="login_banner">
			<img src="${CONTEXT_PATH}/static/jui/themes/default/images/login_banner.jpg" />
		</div>
		<div class="login_main">
			<ul class="helpList">

				<li><a href="#">忘记密码怎么办？</a></li>
				<li><a href="#">为什么登录失败？</a></li>
			</ul>

		</div>
	</div>
	<div id="login_footer">
		Copyright &copy; 2014. All Rights Reserved.
	</div>
</div>



<script type="text/javascript">

</script>
<script type="text/javascript">
	$(function() {
		BASE = '${CONTEXT_PATH}';
		var mainURL =  BASE + '/main';
		//alert(mainURL);
		$('#login_form').ajaxForm({
			type: 'post',
			url: BASE + '/validateLogin',
			dataType: 'json',
			beforeSubmit: function() {
				//alert("aaaaa");
				//return Smart.Validator.checkRequired('login_form');
			},
			success: function(result) {
				//alert(result.statusCode);
				if (result.statusCode=="200") {
					//alert(result.message);
					location.href = mainURL;
				} else {
					alert(result.message);
					$('#login_form').find(':input').prop('disabled', false);

				}
			}
		});
	});
</script>


</body>
</html>